home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2004 #6 / Amiga Plus CD - 2004 - No. 06.iso / AmigaPlus / Begleitmaterial / 50Tools / Grafik / PerfectPaint / rexx / Anim / Ghost.rx < prev    next >
Text File  |  2001-10-01  |  880b  |  69 lines

  1. /*     arexx Script */
  2.  
  3.     options results
  4.     parse ARG Port b
  5.     
  6.     ADDRESS value Port
  7.  
  8.     pp_GetDepth
  9.     D=result
  10.     IF D<24 then DO
  11.         pp_Warn 'This*script*is*only|for*24bits*Picture.'    
  12.         pp_PermitRefresh
  13.         Exit
  14.     END
  15.  
  16.     pp_GetWidth
  17.     w=result
  18.     pp_GetHeight
  19.     h=result
  20.  
  21.     pp_CountFrames
  22.     count=result
  23.     IF count<2 then DO
  24.         pp_Warn 'Make*an*Anim*first.'
  25.         pp_PermitRefresh
  26.         EXIT
  27.     END
  28.  
  29.     depth=5
  30.     pp_DialogInit 150 60 "*Flash*" 1
  31.         pp_Integer 0 70 8 50 16 "Frame#" 1 depth
  32.     pp_Dialog
  33.     rc=result
  34.     IF rc=0 then DO
  35.         EXIT
  36.     END        
  37.  
  38.     pp_GetDialog 0
  39.     depth=result
  40.  
  41.     pp_GetCurrentFrame
  42.     CF=result
  43.  
  44.     pp_GetCurrentBrush
  45.     CB=result
  46.     pp_FindEmptyBrush
  47.     Brush=result
  48.     pp_SetBrush Brush
  49.     pp_PickBrush 0 0 w h 1
  50.  
  51.     step=depth
  52.     Step_f=(0-100)/Step
  53.     
  54.     do i=CF to CF+depth
  55.         pp_GotoFrame i
  56.         f=Step_f*(i-(CF+depth))
  57.         pp_BrushOpacity f
  58.         pp_plot w/2 h/2
  59.     end
  60.  
  61.     pp_BrushOpacity 100
  62.     pp_FreeBrush
  63.     pp_SetBrush CB
  64.  
  65. EXIT
  66.  
  67.  
  68.  
  69.